<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
 *  News Class
 *
 * @package XGO CMS v2.0
 * @subpackage News
 * @author Manh Nguyen - 30/07/2012
 * @link http://sunsoft.vn
*/
class Info extends CI_Controller {

	private $page_item = 5;

	/**
	 * Contrust class
	 *
	 * @access public
	 */
	public function __construct() {
		parent::__construct();
		$this->load->library('smarty3', '', 'smarty');
                $this->smarty = new CI_Smarty3();
		$this->load->database();
		$this->load->library('datamapper');
		$this->load->library('session');
                
                require_once APPPATH.'modules/frontend/common/footer.php';
                require_once (APPPATH.'modules/frontend/common/main_menu.php');
	}

	public function index() {

            $info_code                  = str_replace(URL_SUFFIX,'',$this->uri->segment(2));
            
            if($info_code != "")
            {   
                $news = new News_model();
                $info_detail = $news->get_details('', $info_code);
                
                $this->smarty->assign("info_detail",$info_detail);
                $this->smarty->display('template/frontend/home');
            }
            
            
	}
}

/* End of file news.php */
/* Location: ./system/application/controllers/news.php */